<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>状态管理</title>

    <!-- Bootstrap -->
    <link href="<?php echo PUBLIC_PATH;?>bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <div class="container">
       <h2>选择数据表</h2>
       <ul id="tables">

       </ul>
    
  </div>





    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="<?php echo PUBLIC_PATH;?>bootstrap/js/bootstrap.min.js"></script>

    <script type="text/javascript">
      $(document).ready(function(){
        //页面加载的时候，载入所有的表。
        $.ajax({
         async: true,  
         url: './tables',
         type: 'GET',
         data: '',  
         success: function(response) {
           var html='';
          $.each(response,function(i){
            html+='<li><a href="./tables/'+response[i]+'">'+response[i]+'</a></li>';
          })
          $('#tables').html(html);
         }
        });

      })

    </script>
  </body>
</html>
